<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" th:replace="layout (title='合同模板')">
<div th:fragment="content">
    <div class="m2ban wOpacity wow fadeIn" data-wow-delay="0.0s" th:style="'background-image:url('+${bannerInfo.imgSrc+')'}" >
        <div class="m2banTxt">
            <div class="m2ban_t1 wOpacity wow fadeInUp" data-wow-delay="0.2s" th:text="${bannerInfo.title}"></div>
            <div class="m2ban_des1 wOpacity wow fadeInUp" data-wow-delay="0.4s" th:text="${bannerInfo.realTitle}"></div>
        </div>
    </div>
    <div class="container wOpacity wow fadeIn" data-wow-delay="0.0s">
        <div class="m2htMain clearfix">
            <div class="m2htL">
                <div class="m2htItmNm">模板类型</div>
                <ul class="m2menu2">
                    <li th:class="${currentPid == 20 ? 'on' : ''}"><a href="/template" class="m2menu2_a">全部</a><span th:if="${currentPid == 20}" >全部</span></li>
                    <li th:class="${currentPid == t.id ? 'on' : ''}" th:each="t : ${typeList}"><a th:href="${'/template?pid='+t.id}" th:text="${t.title}" class="m2menu2_a"></a><span th:if="${currentPid == t.id}" th:text="${t.title}"></span></li>
                </ul>
            </div>
            <div class="m2htR">
                <div class="m2htR_t"><label th:text="${currentTitle}"></label> <span th:text="${'模板数量：（'+page.totalCount+'）'}">(：38)</span></div>
                <div class="m2hzmbBox">
                    <table width="940" border="0" cellspacing="0" cellpadding="0">
                        <tr class="m2hzTh">
                            <td align="left">模板名称</td>
                            <td align="center">行业类型</td>
                            <td align="center">发布时间</td>
                            <td align="center">浏览量</td>
                            <td align="center">下载量</td>
                        </tr>
                        <tr th:each="t : ${templateList}">
                            <td align="left"><a th:href="${'/template_detail?id='+t.id}" class="m2hz_sa" th:text="${t.title}"></a></td>
                            <td align="center" th:text="${t.realTitle}"></td>
                            <td align="center" th:text="${#dates.format(t.updateTime, 'yyyy-MM-dd')}"></td>
                            <td align="center" th:text="${t.viewCount}"></td>
                            <td align="center" th:text="${t.downloadCount}"></td>
                        </tr>
                    </table>
                </div>
                <div class="page wOpacity wow fadeIn" data-wow-delay="0.3s"  id="app">
                    <div id="pager"></div>
                </div>
            </div>
        </div>
    </div>
    <script th:inline="javascript">
        layui.use('laypage', function(){
            var laypage = layui.laypage;
            //执行一个laypage实例
            laypage.render({
                elem: 'pager'
                ,count: [[${page.totalCount}]]
                ,limit:[[${page.pageSize}]]
                ,curr:[[${page.currentPage}]]
                ,theme: '#1E9FFF'
                ,jump: function(obj, first){
                    if(!first){
                        location.href='/template?pid='+[[${currentPid}]]+'&page='+obj.curr;
                    }
                }
            });
        });
        $(function () {
            $("#templateLi").addClass("hover");
        })
    </script>
</div>
</html>